﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SaleOnlineSystem.Admin.Controls
{
    public partial class ListBoxProduct : System.Web.UI.UserControl
    {
        public int countbox;
        public int id;
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                 countbox = 1;
                 rpt_Box.DataSource = DAL.DCollector.DBCollector.Instance.SelectSQL("select * from tbl_BoxProduct");
                 rpt_Box.DataBind();

                 rpt_category.DataSource = DAL.DCollector.DBCollector.Instance.SelectSQL("select Category_ID1,Category_Name from tbl_Category WHERE Category_ID2 = 0");
                 rpt_category.DataBind();                      
            }
            catch (Exception)
            {
                Response.Redirect("/error.htm");
            }     
        }
    }
}